package lifei.lifei.spring.proxy;

/**
 * @author 小李
 * @version 1.0
 * @date 2021/9/28 11:49
 */
//租客
public class clientProxy {
    public static void main(String[] args) {
        //真实角色
        Host host=new Host();
        //代理实例的调用处理程序
        ProxyFactory pf=new ProxyFactory();
        //将真实角色放置进去
        pf.setRent(host);
        //动态生成动态的代理类
        Rent proxy =(Rent)pf.getProxy();
       proxy.rent();

    }
}
